package com.duomizhibo.phonelive.fragment;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.duomizhibo.phonelive.AppContext;
import com.duomizhibo.phonelive.R;
import com.duomizhibo.phonelive.adapter.AttentionVideoAdapter;
import com.duomizhibo.phonelive.api.remote.PhoneLiveApi;
import com.duomizhibo.phonelive.base.AbsFragment;
import com.duomizhibo.phonelive.base.BaseFragment;
import com.duomizhibo.phonelive.bean.ActiveBean;
import com.duomizhibo.phonelive.ui.customviews.RefreshLayout;
import com.flyco.tablayout.SegmentTabLayout;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.zhy.http.okhttp.callback.StringCallback;

import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

import okhttp3.Call;

/**
 * Created by cxf on 2017/9/5.
 */

public class YueBangFragment extends AbsFragment{
    private int mPage;
    private Context mContext;
    private View mRootView;


    private Type mType;
    private Gson mGson;
    private AttentionVideoAdapter mAdapter;
    SegmentTabLayout tabLayout_1;
    private String[] mTitles = {"日榜", "周榜","月榜", "总榜"};
    private ArrayList<Fragment> mFragments2 = new ArrayList<>();
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        mContext = getActivity();
        mRootView = inflater.inflate(R.layout.fragment_yue, container, false);



        tabLayout_1 = (SegmentTabLayout) mRootView.findViewById(R.id.tl_1);

//        tabLayout_1 =ViewFindUtils.find(mDecorView,R.id.tl_1);
        for (String title : mTitles) {
            mFragments2.add(SimpleCardFragment2.getInstance("Switch Fragment " + title));
        }
        tabLayout_1.setTabData(mTitles, getActivity(), R.id.fl_change, mFragments2);
        return mRootView;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        initView();

    }

    @Override
    public void onResume() {
        super.onResume();

    }

    private void initView() {


    }




}
